import {createRouter, createWebHistory} from 'vue-router';
import {routes} from "./routes.ts";

// 配置路由
const router = createRouter({
    history: createWebHistory(),
    routes: routes,
});

// 在这里添加路由的导航守卫
router.beforeEach((to, from, next) => {
    console.log('Navigating to:', to.path);
    console.log('from:', from.path);
    next();
});

// 对外暴露路由
export default router;
